|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.justobjects.pushlet.core.EventQueue
public class EventQueue
FIFO queue with guarded suspension.
Purpose
| Constructor Summary | |
|---|---|
EventQueue()
Construct queue with default (8) capacity. |
|
EventQueue(int capacity)
Construct queue with specified capacity. |
|
| Method Summary | |
|---|---|
Event |
deQueue()
Get head; if empty wait until something in queue. |
Event |
deQueue(long maxWaitTime)
Get head; if empty wait for specified time at max. |
Event[] |
deQueueAll(long maxWaitTime)
Get all queued Events. |
boolean |
enQueue(Event item)
Put item in queue; waits() indefinitely if queue is full. |
boolean |
enQueue(Event item,
long maxWaitTime)
Put item in queue; if full wait maxtime. |
int |
getSize()
|
boolean |
isEmpty()
Is the queue empty ? |
boolean |
isFull()
Is the queue full ? |
static void |
main(java.lang.String[] args)
|
static void |
p(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventQueue()
public EventQueue(int capacity)
| Method Detail |
|---|
public boolean enQueue(Event item)
throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean enQueue(Event item,
long maxWaitTime)
throws java.lang.InterruptedException
java.lang.InterruptedException
public Event deQueue()
throws java.lang.InterruptedException
java.lang.InterruptedException
public Event deQueue(long maxWaitTime)
throws java.lang.InterruptedException
java.lang.InterruptedException
public Event[] deQueueAll(long maxWaitTime)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic int getSize()
public boolean isEmpty()
public boolean isFull()
public static void p(java.lang.String s)
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||